#ifndef SKY_H
#define SKY_H
#include "../geom/Point3D.h"

#include <QGLWidget>

using namespace geom;
class Sky
{
    private:
        GLuint m_texture1;

        QColor m_horizCol;
        QColor m_topCol;
        QColor m_underCol;

        Point3D getSegmentedCirclePoint(float heightAngle, float radius, int segments, int currentPoint);
        float getSkyCircleHeight(float heightAnle);
        void interpolateColors(const float * c1, const float * c2, float * result, float interpValue);
        void getColorByAngle(float angle, float * color,float brightness);
            

    public:
        void drawSky(float radius, int segmentsPerCircle, int heightSections,float brightness);
        Sky();
        void setTexture(GLuint texture){m_texture1 = texture;}
        void regenerateArrays();
        void regenerateTextureArrays();
        void draw(float brightness);
        void cleanUp();
};

#endif

